"use client";

import {Tooltip, ActionIcon, Stack, NumberInput} from "@mantine/core";
import {modals} from "@mantine/modals";
import {notifications} from "@mantine/notifications";
import {IconBellSearch} from "@tabler/icons-react";
import React from "react";

export const PannelCheck = () => {
  return (
    <Tooltip
      label="面板检查"
      withArrow
      position="bottom"
      transitionProps={{transition: "fade", duration: 300}}
    >
      <ActionIcon
        variant="light"
        color="red"
        onClick={() => {
          modals.openConfirmModal({
            title: "算法1、2权重配置",
            children: <Stack>检查项</Stack>,
            labels: {confirm: "确定", cancel: "取消"},
            onCancel: () => console.log("Cancel"),
            onConfirm: () => {
              console.log("Confirmed");
              notifications.show({
                color: "green",
                title: "算法1、2权重配置",
                message: "配置成功",
              });
            },
          });
        }}
      >
        <IconBellSearch size={16} />
      </ActionIcon>
    </Tooltip>
  );
};
